package com.bdqn;

public class MySqlDaoFactory implements AbstractFactory{
    @Override
    public NewsDao getInstance() {
        return new NewsDaoMySqlImpl();
    }
    AbstractFactory factory = new MySqlDaoFactory();
    NewsDao dao = factory.getInstance();
    NewsServiceImpl service = new NewsServiceImpl();

    public void setService(NewsServiceImpl service) {
        this.service = service;
    }
}
